package com.lovely602.langchain4j.param.controller.chat;


import com.lovely602.langchain4j.param.service.ChatAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author lizhixing
 */
@Slf4j
@RestController
@RequestMapping(value = "/high")
public class HighApiController {

    @Resource
    private ChatAssistant chatAssistant;

    /**
     * 高级聊天
     */
    @GetMapping(value = "/chat")
    public String chat(@RequestParam(value = "msg", defaultValue = "hello", required = true) String msg) {
        return chatAssistant.chat(msg);
    }

}
